<?php

namespace Maestros\Model\Entity;

use Componentes\Model\Entity\GenericModel;

class Pensum extends GenericModel {
    
    protected $id;
    protected $_materia;
    protected $_malla;
    
    public function __construct(array $options = null) {
        if (is_array($options)) {
            $this->setOptions($options);
        }
    }
    
    public function setId($idPensum) {
        $this->id = $idPensum;
    }
    
    public function getId() {
        return $this->id;
    }

    public function setMateria($idMateria) {
        $this->_materia = $idMateria;
    }
    
    public function getMateria() {
        return $this->_materia;
    }

    public function setMalla($idMalla) {
        $this->_malla = $idMalla;
    }
    
    public function getMalla() {
        return $this->_malla;
    }
    public function objectToArray() {
        if (!is_object($this) && !is_array($this)) {
            return $this;
        }
        if (is_object($this)) {
            $array = array(
                'id' => $this->id,
                '_materia' => $this->_materia,
                '_malla' => $this->_malla
            );
        }
        return $array;
    }

}
